# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor: rebel <novakpetya at yahoo dot co dot uk>

pkgname=qt5pas
_lazarus_tag=2_2_6
_lazarus_version=2.2.6
pkgver=2.6.$_lazarus_version
pkgrel=2
pkgdesc='Free Pascal Qt5 binding library updated by lazarus IDE'
arch=('loong64' 'x86_64')
url='https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main/lcl/interfaces/qt5/cbindings'
license=('LGPL3')
depends=('qt5-base' 'qt5-x11extras')
options=(libtool staticlibs)
source=("https://gitlab.com/freepascal.org/lazarus/lazarus/-/archive/lazarus_${_lazarus_tag}/lazarus-lazarus_${_lazarus_tag}.tar.bz2")
sha512sums=('ca618fed386ef09af15e1215cdc3f04d945dbbe1b40c477a5b3a0cee9fe791077b4e435dc798d27866221ef43732083511227de0cf6f96896166869280994af3')

build() {
    cd "lazarus-lazarus_${_lazarus_tag}/lcl/interfaces/qt5/cbindings"
    qmake-qt5 "QT += x11extras"
    make
}

package() {
    cd "lazarus-lazarus_${_lazarus_tag}/lcl/interfaces/qt5/cbindings"
    make INSTALL_ROOT="$pkgdir" install
}
